<?php
/**
 * 添加到访记录
 */
//获取参数

$vr_uid              = $route->bodyParams['vr_uid'];      //到访人id
$vr_oesid            = $route->bodyParams['vr_oesid'];      //到访机构id
$vr_time             = $route->bodyParams['vr_time'];      //到访时间

if(isset($vr_time) == false){
    $vr_time = time();
}


//写入数组
$insertArr = [
    'vr_uid'            	=> $vr_uid,
    'vr_oesid'              => $vr_oesid,
    'vr_time'  			    => $vr_time
];

//执行写入语句
$rsData = $db->mysqlDB->insert("oa_visiting_records",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );